﻿Imports Microsoft.VisualBasic
Imports System.Data
Imports System.IO

Public Class MyObj
    Public Shared Sub ShowMessage(ByVal message As String)
        Dim js As String

        js = String.Format("alert('{0}');", message)
        ScriptManager.RegisterClientScriptBlock(TryCast(HttpContext.Current.Handler, Page), GetType(String), message.ToString, js, True)
    End Sub

    Public Shared Sub ShowMessage(ByVal format As String, ByVal ParamArray args() As Object)
        MyObj.ShowMessage(String.Format(format, args))
    End Sub
End Class
